package com.example.emos.wx.config.shiro;

import org.springframework.stereotype.Component;

/**
 * @ClassName ThreadLocalToken
 * @Description TODO
 * @Author daoketa
 * @Version 1.0
 **/
@Component
public class ThreadLocalToken {
    private ThreadLocal<String> threadLocal = new ThreadLocal();

    public String getToken(){
        return this.threadLocal.get();
    }

    public void setToken(String token){
        this.threadLocal.set(token);
    }

    public void clear(){
        this.threadLocal.remove();
    }

}
